<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html><head><title>QSimpleXmlNodeModel Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
td.postheader { font-family: sans-serif }
tr.address { font-family: sans-serif }
body { background: #ffffff; color: black; }
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">&#160;&#160;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QSimpleXmlNodeModel Class Reference<br /><sup><sup>[<a href="qtxmlpatterns.html">QtXmlPatterns</a> module]</sup></sup></h1><p>The QSimpleXmlNodeModel class is an implementation of <a href="qabstractxmlnodemodel.html">QAbstractXmlNodeModel</a> sufficient
for many common cases. <a href="#details">More...</a></p>

<p>Inherits <a href="qabstractxmlnodemodel.html">QAbstractXmlNodeModel</a>.</p><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qsimplexmlnodemodel.html#QSimpleXmlNodeModel">__init__</a></b> (<i>self</i>, QXmlNamePool&#160;<i>namePool</i>)</li><li><div class="fn" />QUrl <b><a href="qsimplexmlnodemodel.html#baseUri">baseUri</a></b> (<i>self</i>, QXmlNodeModelIndex&#160;<i>node</i>)</li><li><div class="fn" />QXmlNodeModelIndex <b><a href="qsimplexmlnodemodel.html#elementById">elementById</a></b> (<i>self</i>, QXmlName&#160;<i>id</i>)</li><li><div class="fn" />QXmlNamePool <b><a href="qsimplexmlnodemodel.html#namePool">namePool</a></b> (<i>self</i>)</li><li><div class="fn" />list-of-QXmlName <b><a href="qsimplexmlnodemodel.html#namespaceBindings">namespaceBindings</a></b> (<i>self</i>, QXmlNodeModelIndex)</li><li><div class="fn" />list-of-QXmlNodeModelIndex <b><a href="qsimplexmlnodemodel.html#nodesByIdref">nodesByIdref</a></b> (<i>self</i>, QXmlName&#160;<i>idref</i>)</li><li><div class="fn" />QString <b><a href="qsimplexmlnodemodel.html#stringValue">stringValue</a></b> (<i>self</i>, QXmlNodeModelIndex&#160;<i>node</i>)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QSimpleXmlNodeModel class is an implementation of <a href="qabstractxmlnodemodel.html">QAbstractXmlNodeModel</a> sufficient
for many common cases.</p>
<p>Subclassing <a href="qabstractxmlnodemodel.html">QAbstractXmlNodeModel</a> can be a
significant task, because it requires implementing several, complex
member functions. QSimpleXmlNodeModel provides default
implementations of these member functions that are suitable for a
wide range of node models.</p>
<p>Subclasses of QSimpleXmlNodeModel must be thread-safe.</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QSimpleXmlNodeModel" />QSimpleXmlNodeModel.__init__ (<i>self</i>, <a href="qxmlnamepool.html">QXmlNamePool</a>&#160;<i>namePool</i>)</h3><p>Constructs a <a href="qsimplexmlnodemodel.html">QSimpleXmlNodeModel</a> for use with
with the specified <i>namePool</i>.</p>


<h3 class="fn"><a name="baseUri" /><a href="qurl.html">QUrl</a> QSimpleXmlNodeModel.baseUri (<i>self</i>, <a href="qxmlnodemodelindex.html">QXmlNodeModelIndex</a>&#160;<i>node</i>)</h3><p>Reimplemented from <a href="qabstractxmlnodemodel.html#baseUri">QAbstractXmlNodeModel.baseUri</a>().</p>
<p>Returns the base URI for <i>node</i>. This is always the
document URI.</p>
<p><b>See also</b> <a href="qabstractxmlnodemodel.html#documentUri">documentUri</a>().</p>


<h3 class="fn"><a name="elementById" /><a href="qxmlnodemodelindex.html">QXmlNodeModelIndex</a> QSimpleXmlNodeModel.elementById (<i>self</i>, <a href="qxmlname.html">QXmlName</a>&#160;<i>id</i>)</h3><p>Reimplemented from <a href="qabstractxmlnodemodel.html#elementById">QAbstractXmlNodeModel.elementById</a>().</p>
<p>Always returns a default constructed <a href="qxmlnodemodelindex.html">QXmlNodeModelIndex</a> instance,
regardless of <i>id</i>.</p>
<p>This effectively means the model has no elements that have an
id.</p>


<h3 class="fn"><a name="namePool" /><a href="qxmlnamepool.html">QXmlNamePool</a> QSimpleXmlNodeModel.namePool (<i>self</i>)</h3><p>Returns the name pool associated with this model. The
implementation of <a href="qabstractxmlnodemodel.html#name">name</a>() will use this name
pool to create names.</p>


<h3 class="fn"><a name="namespaceBindings" />list-of-QXmlName QSimpleXmlNodeModel.namespaceBindings (<i>self</i>, <a href="qxmlnodemodelindex.html">QXmlNodeModelIndex</a>)</h3><p>Reimplemented from <a href="qabstractxmlnodemodel.html#namespaceBindings">QAbstractXmlNodeModel.namespaceBindings</a>().</p>
<p>Always returns an empty <a href="qvector.html">QVector</a>. This
signals that no namespace bindings are in scope for
<i>node</i>.</p>


<h3 class="fn"><a name="nodesByIdref" />list-of-QXmlNodeModelIndex QSimpleXmlNodeModel.nodesByIdref (<i>self</i>, <a href="qxmlname.html">QXmlName</a>&#160;<i>idref</i>)</h3><p>Reimplemented from <a href="qabstractxmlnodemodel.html#nodesByIdref">QAbstractXmlNodeModel.nodesByIdref</a>().</p>
<p>Always returns an empty vector, regardless of <i>idref</i>.</p>
<p>This effectively means the model has no elements or attributes
of type <tt>IDREF</tt>.</p>


<h3 class="fn"><a name="stringValue" />QString QSimpleXmlNodeModel.stringValue (<i>self</i>, <a href="qxmlnodemodelindex.html">QXmlNodeModelIndex</a>&#160;<i>node</i>)</h3><p>Reimplemented from <a href="qabstractxmlnodemodel.html#stringValue">QAbstractXmlNodeModel.stringValue</a>().</p>
<p>If <i>node</i> is an element or attribute, <a href="qabstractxmlnodemodel.html#typedValue">typedValue</a>() is called,
and the return value converted to a string, as per <a href="xmlprocessing.html">XQuery</a>'s rules.</p>
<p>If <i>node</i> is another type of node, the empty string is
returned.</p>
<p>If this function is overridden for comments or processing
instructions, it is important to remember to call it (for elements
and attributes having values not of type <tt>xs:string</tt>) to
ensure that the values are formatted according to <a href="xmlprocessing.html">XQuery</a>.</p>
<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;snapshot-4.9.5-9eb6aac99275 for X11</td><td align="center" width="50%">Copyright &#169; <a href="http://www.riverbankcomputing.com">Riverbank&#160;Computing&#160;Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2012</td><td align="right" width="25%">Qt&#160;4.8.3</td></tr></table></div></address></body></html>